#pragma once

#include "stdafx.h"
#include "com_core_def.h"
#include "dbg_log_output.h"
#include "FFByteStreamHandler.h"

VOID DllAddRef();
VOID DllRelease();

class CClassFactory : public IClassFactory
{
	ULONG RefCount = 1;
public:
	CClassFactory()
	{
		DllAddRef();
	}
	~CClassFactory()
	{
		DllRelease();
	}
public:
	IFACEMETHODIMP QueryInterface(REFIID riid,void** ppvObject);
	IFACEMETHODIMP_(ULONG) AddRef();
	IFACEMETHODIMP_(ULONG) Release();
public:
	STDMETHODIMP LockServer(BOOL fLock);
	STDMETHODIMP CreateInstance(IUnknown* pUnkOuter,REFIID riid,void** ppvObject);
};